import os
import cv2
ipath="/home/shuaihu/图片/jpg001"
fs=os.listdir(ipath)
for f in fs:
    fn=os.path.join(ipath,f)
    img=cv2.imread(fn)
    cv2.imshow("img",img)
    key=cv2.waitKey(0)
    if key==27:break

